package com.xmall.product.define.request.spu;

import com.xmall.validate.group.AddGroup;
import com.xmall.validate.group.UpdateGroup;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 属性可选项关联
 */
@Getter
@Setter
public class SpuSaleAttrOptionRequest implements Serializable {

    /**
     * 属性ID
     */
    private Long attrId;

    /**
     * 可选项编号
     */
    @NotNull(message = "可选项编号不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private Long attrOptionSn;

    /**
     * 可选项值
     */
    @NotBlank(message = "可选项值不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private String attrValue;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private Integer sort;

    /**
     * 类型（0基本属性 1公共销售属性 2spu销售属性）
     */
    private Integer type;

}
